import pandas as pd
import json

f = open('../datasets/body_title/refined_333563issues_reponobodytitlespctok.json', 'r')
data = json.load(f)
# train_data = pd.DataFrame(data[0])
# valid_data = pd.DataFrame(data[1])
# test_data = pd.DataFrame(data[2])
#
# train_data.to_csv('datasets/body_title/train.csv')
# valid_data.to_csv('datasets/body_title/valid.csv')
# test_data.to_csv('datasets/body_title/test.csv')
#
# print(train_data)
# print(train_data.dtypes)
# print(valid_data)
# print(test_data)

# ndata = data[0]
# ndata.extend(data[1])
# ndata.extend(data[2])
# ndata = pd.DataFrame(ndata)
# ndata.to_csv('datasets/body_title/total.csv')

ndata = pd.read_csv('../datasets/body_title/total.csv')
print(ndata)
